let OSS = require('ali-oss');
let config = require('../../../../config')
let client = new OSS({
  accessKeyId: 'LTAIKqa4XUOwajiT',
  accessKeySecret: '7ycL9N1EJ5MdcF9FdT0jzepj5rgZ3d'
})
client.useBucket(config.bucket);
module.exports = class extends think.Controller {
  async indexAction () { // 检查版本
    try{
      let url = client.signatureUrl(this.get('objname') , {expires: 3600})
      this.redirect(url);
    } catch (err) {
      this.redirect('/404');
    }
  }
}